﻿using Swimj.DomainLib.Entities;

namespace Production.DomainLib.AggregatesModel.StandardBomAggregate
{
    public class StandardBomDetail : AuditableEntity<int>
    {
        public int MaterialId { get; set; }

        public string? MaterialCode { get; set; }

        public string? MaterialName { get; set; }

        public double Quality { get; set; }

        public double LossRate { get; set; }

        public StandardBomDetail()
        {
        }

        public StandardBomDetail(int materialId, string? materialCode, string? materialName, double quality,
            double lossRate) : this()
        {
            MaterialId = materialId;
            MaterialCode = materialCode;
            MaterialName = materialName;
            Quality = quality;
            LossRate = lossRate;
        }

        public void Update(int materialId, string? materialCode, string? materialName, double quality,
            double lossRate)
        {
            MaterialId = materialId;
            MaterialCode = materialCode;
            MaterialName = materialName;
            Quality = quality;
            LossRate = lossRate;
        }
    }
}